import Vue from 'vue'
import Router from 'vue-router'
import first from '@/components/first'
import component from '@/components/component'
import users from '@/components/users'
import history from '@/components/history'
import collection from '@/components/collection'
import carts from '@/components/carts'
import order from '@/components/order'
import login from '@/components/Login'
import loginyx from '@/components/Loginyx'
import logindx from '@/components/Logindx'
import goods from '@/components/goods'
import orders from '@/components/orders'
import good from '@/components/good'
import historyDetail from '@/components/historyDetail'
import jcc from '@/components/jcc'
import jccList from '@/components/jccList'
import heat from '@/components/heat'
import score from '@/components/score'
import tuijian from  '@/components/tuijian'
import err from  '@/components/404'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'component',
      component: component,
      children:[
        // {
        //   path: '/',
        //   name: 'first',
        //   component: first,
        // },
        {
          path:'/',
          name:'jcc',
          component:jcc,
          children:[
            {path:'/jccList',name:'jccList',component:jccList},
            {path:'/',name:'/tuijian',component:tuijian},
            {path:'/heat',name:'/heat',component:heat},
            {path:'/score',name:'/score',component:score}
          ]
        },
        {
      path: '/users',
      name: 'users',
      component: users,
    },
    {
      path: '/history',
      name: 'history',
      component: history,
    },
    {
      path: '/collection',
      name: 'collection',
      component: collection,
    },
    {
      path: '/carts',
      name: 'carts',
      component: carts,
    },
    {
      path: '/order',
      name: 'order',
      component: order,
    },
    {
      path: '/login',
      name: 'login',
      component: login,
    },
    {
      path: '/loginyx',
      name: 'loginyx',
      component: loginyx,
    },
    {
      path: '/logindx',
      name: 'logindx',
      component: logindx,
    },
    {
      path: '/goods',
      name: 'goods',
      component: goods,
    },
    {
      path: '/good',
      name: 'good',
      component: good,
    },
    {
      path: '/orders',
      name: 'orders',
      component: orders,
    },
    {
      path: '/historyDetail',
      name: 'historyDetail',
      component: historyDetail,
    },
        {
          path:"err",
          component:err
        }
  ]
},
  ]
})
